import request from "@/plugins/request";

var pre = "/visitorscenter";

if (process.env.NODE_ENV !== "development") {
  pre = "/api/sa/conv-access" + pre;
}


// 新增访客中心
export function add(data) {
  return request({
    url: `${pre}/add`,
    method: "post",
    data,
  });
}

// 删除访客中心
export function del(data) {
  return request({
    url: `${pre}/del`,
    method: "post",
    data,
  });
}

// 修改访客中心
export function edit(data) {
  return request({
    url: `${pre}/edit`,
    method: "post",
    data,
  });
}


// 访客中心信息回显
export function getById(VisitorsCenterId) {
  return request({
      url: `${pre}/get?VisitorsCenterId=${VisitorsCenterId}`,
      method: 'GET',
  });
}



// 获取访客中心下拉
export function getVisitorsCenterSelect() {
  return request({
      url: `${pre}/getSelect`,
      method: 'post'
  });
}


// 访客中心信息回显
export function queryInterviewerByCorpIdListSelect(interviewerId) {
  return request({
    url: `${pre}/queryInterviewerByCorpIdListSelect?interviewerCorpId=${interviewerId}`,
    method: 'post',
  });
}
// 获取访客中心下拉
export function getVisitorsCenterByCorpIdSelect() {
  return request({
      url: `${pre}/getSelectByCorpId`,
      method: 'post'
  });
}


// 访客中心信息回显
export function queryInterviewerByCorpIdList(interviewerId) {
  return request({
      url: `${pre}/queryInterviewerByCorpIdList?interviewerCorpId=${interviewerId}`,
      method: 'post',
  });
}

// // 访客中心信息回显
// export function queryInterviewerByCorpIdListSelect(interviewerId) {
//   return request({
//       url: `${pre}/queryInterviewerByCorpIdListSelect?interviewerCorpId=${interviewerId}`,
//       method: 'post',
//   });
// }


//禁用访客中心
export function editCenterableStatus(data) {
  return request({
      url: `${pre}/editCenterableStatus`,
      method: 'post',
      data
  });
}
